package com.notelapierdas.objects;

import android.os.Parcel;
import android.os.Parcelable;

public class Business implements Parcelable{
	
	private String name;
	private Address address;
	private String url;
	private String email;
	private String telephone;
	
	public Business(String name, Address address, String url, String email, String telephone){
		this.name = name;
		this.address = address;
		this.url = url;
		this.email = email;
		this.telephone = telephone;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	
	/////////////Parcelable//////////////////////////////
	
	public Business(Parcel in) {
		readFromParcel(in);
	}

	private void readFromParcel(Parcel in) {
		// TODO Auto-generated method stub
		name = in.readString();
		address = in.readParcelable(Address.class.getClassLoader());
		url = in.readString();
		email = in.readString();
		telephone = in.readString();
		
	}
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO Auto-generated method stub
		dest.writeString(name);
		dest.writeParcelable(address, flags);
		dest.writeString(url);
		dest.writeString(email);
		dest.writeString(telephone);
	}	
	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}
	
	@SuppressWarnings("rawtypes")
	public static final Parcelable.Creator CREATOR =
    	new Parcelable.Creator() {
            public Business createFromParcel(Parcel in) {
                return new Business(in);
            }
 
            public Business[] newArray(int size) {
                return new Business[size];
            }
        };
	
	///////////////////////////////////////////////////////
	
	

}
